package com.pajk.user.model;

import java.io.Serializable;

/**
 * Created by peide.zhang on 5/7/14.
 */
public class RedoMonitor extends Entity
        implements Serializable {
    private String id;
    private String businessId;
    private String msgBody;
    private String topic;
    private String description;
    private Byte status;
    private String errorMsg;

    public RedoMonitor() {}
    public RedoMonitor(String id, String businessId, String msgBody, String topic, String description, Byte status, String errorMsg) {
        this.id = id;
        this.businessId = businessId;
        this.msgBody = msgBody;
        this.topic = topic;
        this.description = description;
        this.status = status;
        this.errorMsg = errorMsg;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getBusinessId() {
        return businessId;
    }

    public void setBusinessId(String businessId) {
        this.businessId = businessId;
    }

    public String getMsgBody() {
        return msgBody;
    }

    public void setMsgBody(String msgBody) {
        this.msgBody = msgBody;
    }

    public String getTopic() {
        return topic;
    }

    public void setTopic(String topic) {
        this.topic = topic;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Byte getStatus() {
        return status;
    }

    public void setStatus(Byte status) {
        this.status = status;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        RedoMonitor that = (RedoMonitor) o;

        if (businessId != null ? !businessId.equals(that.businessId) : that.businessId != null) return false;
        if (description != null ? !description.equals(that.description) : that.description != null) return false;
        if (errorMsg != null ? !errorMsg.equals(that.errorMsg) : that.errorMsg != null) return false;
        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (msgBody != null ? !msgBody.equals(that.msgBody) : that.msgBody != null) return false;
        if (status != null ? !status.equals(that.status) : that.status != null) return false;
        if (topic != null ? !topic.equals(that.topic) : that.topic != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (businessId != null ? businessId.hashCode() : 0);
        result = 31 * result + (msgBody != null ? msgBody.hashCode() : 0);
        result = 31 * result + (topic != null ? topic.hashCode() : 0);
        result = 31 * result + (description != null ? description.hashCode() : 0);
        result = 31 * result + (status != null ? status.hashCode() : 0);
        result = 31 * result + (errorMsg != null ? errorMsg.hashCode() : 0);
        return result;
    }
}
